#include "Sock.hpp"

void Usage(std::string proc)
{
    std::cerr << "Usage: " << proc << " port" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(1);
    }

    int sockfd = UDPSock::Socket();
    UDPSock::Bind(sockfd, atoi(argv[1]));
    // struct sockaddr_in local;
    // memset(&local, 0, sizeof(local));
    // local.sin_family = AF_INET;
    // local.sin_port = htons(atoi(argv[1]));
    // local.sin_addr.s_addr = INADDR_ANY;
    // bind(sockfd, (struct sockaddr*)&local, sizeof(local));

    sleep(100);
    close(sockfd);
    return 0;
}